game_manager
{
	spawn
	{
		accum 1 set 0
		accum 2 set 0

		wm_axis_respawntime 30
		wm_allied_respawntime 20
		wm_set_round_timelimit 15
		wm_number_of_objectives 1
		wm_setwinner 0

		wm_objective_status 1 1 0

		wait 150

		setautospawn "The Train Cars" 1

		setstate forwardbunker_wo invisible

		wait 1000

		wm_teamvoiceannounce 0 "radar_axis_bunker_stop"
		wm_teamvoiceannounce 1 "radar_allies_bunker_capture"
		wm_addteamvoiceannounce 0 "radar_axis_bunker_stop"
		wm_addteamvoiceannounce 1 "radar_allies_bunker_capture"
		
		setstate axis_lever_trigger invisible
		setstate goldclip2 invisible
	}

	trigger objective_counter
	{
		accum 1 inc 1
		trigger game_manager checkgame
	}

	trigger checkgame
	{
		accum 1 abort_if_not_equal 2

		wm_announce "Allies have escaped with the Gold!"
		wm_setwinner 1
		//wait 500
		wm_endround
	}		
}

forwardbunkerflag
{
	spawn
	{
		wait 200
		remove
	}

	trigger axis_capture
	{
	}

	trigger allied_capture
	{
	}

	trigger switchit
	{
	}
}

east_wall
{
	spawn 
		{
		set
		{
		constructible_class 1
		health "400"
		accum 3 abort_if_equal 1
		accum 3 set 1

		alertentity east_rubble
	}
}
}

west_wall
{
	spawn 
		{
		set
		{
		constructible_class 1
		health "400"
		accum 4 abort_if_equal 1
		accum 4 set 1

		alertentity west_rubble
	}
}
}

axis_gold1
{
	spawn
	{
		wait 200
		remove
	}

	trigger stolen
	{
	}

	trigger returned
	{
	}

	trigger captured
	{
	}
}

axis_gold2
{
	spawn
	{
		wait 200

		remove
	}

	trigger stolen
	{
	}

	trigger returned
	{
	}

	trigger captured
	{
	}
}

truckbed_trigger1
{
	spawn
	{
	}

	death
	{
		setstate axis_gold_red1 invisible
		setstate axis_gold_captured1 default

		trigger game_manager checkgame

		remove
	}
}

truckbed_trigger2
{
	spawn
	{
	}

	death
	{
		setstate axis_gold_red2 invisible
		setstate axis_gold_captured2 default

		trigger game_manager checkgame

		remove
	}
}

lever
{
	spawn
	{
	}

	trigger move_up
	{
		playsound sound/movers/switches/switch.wav
	}
	
	trigger move_down
	{
		playsound sound/movers/switches/butn2.wav
	}
}

lever_trigger
{
	spawn
	{
		accum 1 set 1
	}

	trigger up
	{
		accum 1 abort_if_not_equal 1
		accum 1 set 0

		trigger lever move_up
		trigger door2 move_up
		trigger door3 move_up

		alertentity door_open_trigger

		trigger sounds off

		wm_announce "The Loading Doors are Opening!"

		wm_objective_status 5 0 2
		wm_objective_status 5 1 1

		wait 2500

		setstate allies_lever_trigger invisible
		setstate axis_lever_trigger default

		trigger lever_trigger2	setaccum0

		
		//trigger golddoor1 auf
		//trigger golddoor2 auf
	}
	
	trigger setaccum1
	{
		accum 1 set 1
	}

}

sounds
{
	spawn
	{
	}

	off
	{
		wait 10000

		alertentity door_open_trigger
	}
	
	offer
	{
		wait 5000
		
		alertentity door_open_trigger
	}
}

lever_trigger2
{
	spawn
	{
		accum 2 set 1
	}
	
	trigger down
	{
		accum 2 abort_if_not_equal 0
		accum 2 set 1

		trigger lever move_down
		trigger door2 move_down
		trigger door3 move_down

		wm_announce "The Loading Doors are Closing!"

		wait 2500

		setstate allies_lever_trigger default
		setstate axis_lever_trigger invisible

		alertentity door_open_trigger

		trigger sounds offer

		trigger lever_trigger setaccum1

		//trigger golddoor1 zu
		//trigger golddoor2 zu
	}

	trigger setaccum0
	{
		accum 2 set 0
	}
}


door2
{
	spawn
	{
	}

	trigger move_up
	{
		wait 500

		playsound sound/movers/misc/big_gate1.wav

		wait 400

		playsound sound/movers/misc/big_gate2.wav looping forever

		gotomarker door2_uppos 32 wait

		stopsound

		playsound sound/movers/misc/big_gate3.wav
	}
	
	trigger move_down
	{
		wait 500

		playsound sound/movers/misc/big_gate1.wav

		wait 400

		playsound sound/movers/misc/big_gate2.wav looping forever

		gotomarker door2_downpos 32 wait

		stopsound

		playsound sound/movers/misc/big_gate3.wav
	}
}

door3
{
	spawn
	{
	}

	trigger move_up
	{
		wait 500

		playsound sound/movers/misc/big_gate1.wav

		wait 400

		playsound sound/movers/misc/big_gate2.wav looping forever

		gotomarker door3_uppos 32 wait

		stopsound

		playsound sound/movers/misc/big_gate3.wav
	}
	
	trigger move_down
	{
		wait 500

		playsound sound/movers/misc/big_gate1.wav

		wait 400

		playsound sound/movers/misc/big_gate2.wav looping forever

		gotomarker door3_downpos 32 wait

		stopsound

		playsound sound/movers/misc/big_gate3.wav
	}
}

golddoor1
{
	spawn
	{
	remove
	}

	trigger auf
	{
		wait 500

		playsound sound/movers/doors/door5_open.wav

		faceangles 0 270 0 3000

	}
	
	trigger zu
	{
		wait 500

		playsound sound/movers/doors/door5_close.wav

		faceangles 0 0 0 3000


	}

	trigger bewege
	{
		gotomarker golddoor1point 1000 wait
	}
}

golddoor2
{
	spawn
	{
	remove
	}

	trigger auf
	{
		wait 500

		playsound sound/movers/doors/door5_open.wav

		faceangles 0 270 0 3000

	}
	
	trigger zu
	{
		wait 500

		playsound sound/movers/doors/door5_close.wav

		faceangles 0 0 0 3000
		
	}

	trigger bewege
	{
	}

	trigger schnellzu
	{
	}
}

elevator_trigger
{
	spawn
	{
	}

	trigger activate
	{
		trigger bottom_l_door close
		trigger bottom_r_door close

		wait 700

		trigger eldoor_l closelow
		trigger eldoor_r closelow

		wait 2000

		trigger eldoor_l move_up
		trigger eldoor_r move_up
		trigger elevator move_up

		wait 2500


		trigger top_l_door open
		trigger top_r_door open

		wait 700

		alertentity ding_trigger

		trigger eldoor_l openhigh
		trigger eldoor_r openhigh

		wait 1000


		wait 3000

		trigger top_l_door close
		trigger top_r_door close

		wait 700

		trigger eldoor_l closehigh
		trigger eldoor_r closehigh

		wait 2000

		trigger eldoor_l move_down
		trigger eldoor_r move_down
		trigger elevator move_down

		wait 2500

		trigger bottom_l_door open
		trigger bottom_r_door open

		wait 700

		trigger eldoor_l openlow
		trigger eldoor_r openlow
	}

}

elevator
{
	spawn
	{
	}

	trigger move_up
	{
		gotomarker elevator_uppos 100
	}

	trigger move_down
	{
		gotomarker elevator_downpos 100
	}
}

eldoor_l
{
	spawn
	{
	}

	trigger openlow
	{
		gotomarker eldoor_l_openlow 24
	}

	trigger closelow
	{
		gotomarker eldoor_l_closedlow 24
	}

	trigger move_up
	{
		gotomarker eldoor_l_closedhigh 100
	}

	trigger move_down
	{
		gotomarker eldoor_l_closedlow 100
	}

	trigger openhigh
	{
		gotomarker eldoor_l_openhigh 24
	}

	trigger closehigh
	{
		gotomarker eldoor_l_closedhigh 24
	}
}

eldoor_r
{
	spawn
	{
	}

	trigger openlow
	{
		gotomarker eldoor_r_openlow 24
	}

	trigger closelow
	{
		gotomarker eldoor_r_closedlow 24
	}

	trigger move_up
	{
		gotomarker eldoor_r_closedhigh 100
	}

	trigger move_down
	{
		gotomarker eldoor_r_closedlow 100
	}

	trigger openhigh
	{
		gotomarker eldoor_r_openhigh 24
	}

	trigger closehigh
	{
		gotomarker eldoor_r_closedhigh 24
	}


}

bottom_l_door
{
	spawn
	{
	}

	trigger open
	{
		gotomarker bottom_l_door_open 24
	}

	trigger close
	{
		gotomarker bottom_l_door_closed 24
	}
}

bottom_r_door
{
	spawn
	{
	}

	trigger open
	{
		gotomarker bottom_r_door_open 24
	}

	trigger close
	{
		gotomarker bottom_r_door_closed 24
	}
}

top_l_door
{
	spawn
	{
	}

	trigger open
	{
		gotomarker top_l_door_open 24
	}

	trigger close
	{
		gotomarker top_l_door_closed 24
	}
}

top_r_door
{
	spawn
	{
	}

	trigger open
	{
		gotomarker top_r_door_open 24
	}
	
	trigger close
	{
		gotomarker top_r_door_closed 24
	}
}

doorbutton
{
	spawn
	{
		wait 400

		setstate axis_lever_trigger default
		setstate allies_lever_trigger default

		setstate doorbutton_materials invisible
		setstate doorbutton_materials_clip invisible
		setstate doorbutton_toi invisible
	}

	trigger setup
	{
		setstate doorbutton_materials default
		setstate doorbutton_materials_clip default
	}

	buildstart final
	{
	}

	built final
	{
	}

	decayed final
	{
	}

	death
	{
	}

	trigger remove
	{
		setstate doorbutton_toi invisible
		setstate doorbutton_materials invisible
		setstate doorbutton_materials_clip invisible

		remove
	}
}

